wayland: Prepare against NULL selection owners on data_source requests
authorCarlos Garnacho <carlosg@gnome.org>
Mon, 29 Jun 2015 14:32:01 +0000 (16:32 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Mon, 29 Jun 2015 16:39:05 +0000 (18:39 +0200)
commit50178ce0147388ceffd7cafedfd85befcdfc4137
treede7fe01488dd9397f936a4301caf8724fd44a0ec
parent109572286c138c11850cefb823e839c6f29d37b8
wayland: Prepare against NULL selection owners on data_source requests

Currently, due to the lack of progress information in the Wayland DnD
protocol, we assume a DnD operation is finished after the first
data_source.send is finished (It's either that or leaving stuck grabs).

This however breaks previous assumptions that dest widgets can request
the data multiple times, even in response to GtkWidget::drag-motion.
This leaves us with a NULL owner for the DnD atom when we aren't
finished receiving wl_data_source events yet, causing a crash.

This commit fixes the crash, the behavior left is still far from
desirable though...
gdk/wayland/gdkselection-wayland.c